<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@page import="swim2.entitybeans.WorkRequest"%>   
<%@page import="swim2.entitybeans.User"%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xml:lang="en">

<head>
    <!--
    Swim2 Theme - Ing. Software 2
    -->
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Feedback Form</title>
	<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" />
	<style type="text/css">
	.art-post .layout-item-0 { padding-right: 10px;padding-left: 10px; padding-right: 10px;padding-left: 10px; }
   </style>
</head>

<body>

<div id="art-page-background-glare-wrapper">
    <div id="art-page-background-glare"></div>
	</div>
<div id="art-main">
    <div class="cleared reset-box"></div>
    
<!--HEADER-->
<div class="art-header">
	<div class="art-header-position">
		<div class="art-header-wrapper">
        	<div class="cleared reset-box"></div>
            	<div class="art-header-inner">
                <div class="art-headerobject"></div>
                <div class="art-logo">
                    <h1 class="art-logo-name"><a href="./index.jsp">SWIM v2</a></h1>
                </div>
                </div>
    	</div>
	</div>
</div>
<div class="cleared reset-box"></div>
    
<!--NAVBAR-->    
<div class="art-bar art-nav">
<div class="art-nav-outer">
<div class="art-nav-wrapper">
<div class="art-nav-inner">
<!--Blocks Menu-->
<ul class="art-hmenu">
		<li>
			<form method="post" action="ReturnUserPanel">
			<input id="id" name="id" type="hidden" value="<%= request.getAttribute("authorId") %>">
			<input type="submit" class="menuForm" value="Torna alla pagina utente">
			</form>
		</li>
		<li>	
			<button class="menuForm" onclick="window.location.href='index.jsp';">Logout</button>
		</li>	
</ul>	
</div>
</div>
</div>
</div>
<div class="cleared reset-box"></div>

<!--BOX-->
<div class="art-box art-sheet">
	<div class="art-box-body art-sheet-body">
    	<div class="art-layout-wrapper">
        	<div class="art-content-layout">
            	<div class="art-content-layout-row">
                	<div class="art-layout-cell art-content">

<div class="art-box art-post">
<div class="art-box-body art-post-body">
<div class="art-post-inner art-article">
					<!--Titolo centrale-->	
                    <h1 class="art-postheader">Lascia un nuovo feedback: </h1>
                                                
<div class="art-postcontent">
<div class="art-content-layout">
<div class="art-content-layout-row">
<div class="art-layout-cell layout-item-0" style="width: 100%;">
    	<!--Contenuto principale-->
	
	<br>	
	<script type='text/javascript'>

	</script>
		<table border="0" cellpadding="1" cellspacing="2" width="50%">
			
			<TBODY>
		
			<form method="post" action="FeedbackInsertion.jsp">
			
			<tr>
				<td align="left" width="0%">Titolo: </td>
				<td align="left" width="100%"><INPUT id="title" name="title" type="" value=""></td>
			</tr>
			
			<tr>
				<td align="left" width="0%">Utente: </td>
				<td align="left" width="100%">
				<select name="recipientId">
					<option id="recipientId" name="recipientId" type="" value="0"><c:out value="-- seleziona un utente --" /></option>
					<%
					ArrayList<User> workers = (ArrayList<User>) request.getAttribute("workers");
					for(int i=0; i<workers.size(); i++){
						out.println("<option id=\"recipientId\" name=\"recipientId\" type=\"\" value=\""+workers.get(i).getId()+"\">"+workers.get(i).getName()+" "+workers.get(i).getSurname()+"</option>");
					}
					%>
				</select></td>
			</tr>
			
			<tr>
				<td align="left" width="15%">Voto: </td>
				<td align="left" width="100%">
				<select name="rate">
					<option id="rate" name="rate" type="" value="0">-- seleziona un voto da 1 a 5 --</option>
					<option id="rate" name="rate" type="" value="1"><c:out value="1 (pessimo)" /></option>
					<option id="rate" name="rate" type="" value="2"><c:out value="2 (mediocre)" /></option>
					<option id="rate" name="rate" type="" value="3"><c:out value="3 (discreto)" /></option>
					<option id="rate" name="rate" type="" value="4"><c:out value="4 (buono)" /></option>
					<option id="rate" name="rate" type="" value="5"><c:out value="5 (ottimo)" /></option>
					
				</select>
				</td>
			</tr>
			
			<input id="authorId" name="authorId" type="hidden" value="<%= request.getAttribute("authorId") %>">
			<input id="abilityId" name="abilityId" type="hidden" value="<%= request.getAttribute("abilityId") %>">
			<input id="wrId" name="wrId" type="hidden" value="<%= request.getAttribute("wrId") %>">
			
			<tr>
			<td align="left" width="0%"></td>
			<td align="left" width="50%"><input type="submit" value="Submit"></td>
			</tr>		
			</form>
			
			</TBODY>
			
		</table>
		
<!--Fine contenuto principale-->
</div>
</div>
</div>
</div>
<div class="cleared"></div>

</div>
<div class="cleared"></div>
</div>
</div>
					<div class="cleared"></div>
                	</div>
            	</div>
        	</div>
    	</div>
    <div class="cleared"></div>
    <div class="cleared"></div>
	</div>
</div>
    
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
    
<!--FOOTER--> 
<div class="art-footer">
	<div class="art-footer-body">
    	<div class="art-footer-center">
        	<div class="art-footer-wrapper">
            	<div class="art-footer-text">
                	<p>Filippo Pellegrini - Alex Piermatteo - Matteo Tornielli</p>
                    <div class="cleared"></div>
                    <p class="art-page-footer">Swim v.2</p>
                </div>
            </div>
        </div>
        <div class="cleared"></div>
    </div>
</div>
<div class="cleared"></div>

<!--Fine main-->
</div>	
	
</body>
</html>